<?php
class TextDumpArmyVisitor extends ArmyVisitor{
	private $text='' ;


	function visit( $node){
		$ret = "";
		$pad = 4*$node->getDepth();
		$ret .=sprintf("%{$pad}s","");
		$ret .=get_class($node).":";
		$ret .="bombard: ".$node->bombardStrength()."\n<BR/>";
		//var_dump($ret);
		$this->text .= $ret;
	}

	function getText(){
		return $this->text;
	}
}